/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mesaayuda.mrysi.model;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Gio
 */
@Entity
@Table(name = "CAUSASCERRARTICKET")
@NamedQueries({
    @NamedQuery(name = "Causascerrarticket.findAll", query = "SELECT c FROM Causascerrarticket c")})
public class Causascerrarticket implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IDCAUSASCERRARTICKET")
    private Short idcausascerrarticket;
    @Column(name = "DESCRIPCIONCAUSASCERRARTICKET")
    private String descripcioncausascerrarticket;
    @OneToMany(mappedBy = "idcausascerrarticket")
    private Collection<Ticket> ticketCollection;

    public Causascerrarticket() {
    }

    public Causascerrarticket(Short idcausascerrarticket) {
        this.idcausascerrarticket = idcausascerrarticket;
    }

    public Short getIdcausascerrarticket() {
        return idcausascerrarticket;
    }

    public void setIdcausascerrarticket(Short idcausascerrarticket) {
        this.idcausascerrarticket = idcausascerrarticket;
    }

    public String getDescripcioncausascerrarticket() {
        return descripcioncausascerrarticket;
    }

    public void setDescripcioncausascerrarticket(String descripcioncausascerrarticket) {
        this.descripcioncausascerrarticket = descripcioncausascerrarticket;
    }

    public Collection<Ticket> getTicketCollection() {
        return ticketCollection;
    }

    public void setTicketCollection(Collection<Ticket> ticketCollection) {
        this.ticketCollection = ticketCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idcausascerrarticket != null ? idcausascerrarticket.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Causascerrarticket)) {
            return false;
        }
        Causascerrarticket other = (Causascerrarticket) object;
        if ((this.idcausascerrarticket == null && other.idcausascerrarticket != null) || (this.idcausascerrarticket != null && !this.idcausascerrarticket.equals(other.idcausascerrarticket))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mesaayuda.mrysi.model.Causascerrarticket[ idcausascerrarticket=" + idcausascerrarticket + " ]";
    }
    
}
